package com.common.dao.interfaces;

import java.util.List;

import com.common.dao.util.Criteria;
import com.common.dao.util.Order;
import com.common.security.exceptions.DatabaseException;

public interface IDao<T> {

	public void save(T item) throws DatabaseException;
	
	public void update(T item) throws DatabaseException;
	
	public void delete(T item) throws DatabaseException;
	
	public T getById(Long id) throws DatabaseException;
	
	public List<T> getAll() throws DatabaseException;
	
	public List<T> getByCriteria(List<Criteria> criterias) throws DatabaseException;
	
	public List<T> getByOrder(List<Order> orders) throws DatabaseException;
	
	public List<T> getByOrderedCriteria(List<Criteria> criterias, List<Order> orders) throws DatabaseException;
}
